In the related art, there is known an in-vehicle camera mounted on a vehicle to photograph surroundings of the vehicle. An image photographed by the in-vehicle camera is monitored and displayed, for example, to assist driver's visibility and is used in sensing to detect a white line on the road or an approaching object to the vehicle.
Incidentally, an attachable matter such as raindrops, snowflakes, dust, and mud is attached to a lens of the in-vehicle camera and may hinder the visibility assistance or the sensing described above. In this regard, a technique of removing an attachable matter by spraying washing water or compressed air to the lens of the in-vehicle camera has been proposed. In this technique, for example, a detection algorithm for detecting an attachable matter on a lens by analyzing a photographed image of the in-vehicle camera may be employed (for example, see Japanese Laid-open Patent Publication No. 2001-141838).
However, in the related art described above, there is a need for improvement in terms of improving accuracy of detecting an attachable matter.
The aforementioned detection algorithm includes, for example, detecting an edge from a photographed image and extracting a contour of the attachable matter on the basis of such edges. However, an image of the attachable matter such as a raindrop may blur, and the contour may blur in some cases. Therefore, it was difficult to perform detection with high accuracy in some cases.
Even when the contour of the raindrop is clear, for example, a structure having a shape similar to the raindrop may be erroneously detected as a raindrop.